<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()
</script>

<template>
  <!-- 路由视图组件，用于显示当前路由匹配的组件 -->
  <router-view></router-view>
</template>

<style scoped>
.main-container {
  width: 100%;
  height: 100vh;
  position: relative;
  background-color: #f0f2f5;
  overflow: hidden;
}

.main-interface {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.top-bar {
  height: 70px;
  background-color: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  color: white;
  position: absolute;
  top: 25%;
  left: 19%;
  width: 60%;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  margin-right: 10px;
}

.system-name {
  font-size: 20px;
  font-weight: bold;
}

.right-buttons {
  display: flex;
  align-items: center;
}

.button {
  margin-left: 15px;
  cursor: pointer;
}

.main-content {
  flex: 1;
  position: relative;
}

.background-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-buttons {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  gap: 8%;
}

.main-button {
  cursor: pointer;
  transform: scale(0.85); /* 缩小按钮尺寸 */
  transition: transform 0.2s ease; /* 添加过渡效果 */
}

.quick-task-button {
  position: absolute;
  bottom: 23%;
  right: 20%;
}

.quick-task-button button {
  background-color: #4a6baf;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* 登录弹窗样式 */
.login-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialog-content {
  background-color: white;
  width: 400px;
  border-radius: 8px;
  overflow: hidden;
}

.dialog-header {
  background-color: #4a6baf;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-button {
  cursor: pointer;
  font-size: 20px;
}

.dialog-body {
  padding: 20px;
}

.input-group {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  overflow: hidden;
}

.input-icon {
  padding: 10px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon img {
  width: 20px;
  height: 20px;
}

input[type="text"],
input[type="password"] {
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
}

.error-message {
  color: red;
  margin-bottom: 15px;
  font-size: 14px;
}

.remember-password {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.register-button button {
  background-color: transparent;
  border: 1px solid #4a6baf;
  color: #4a6baf;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.login-button-container button {
  width: 100%;
  background-color: #4a6baf;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

/* 注册弹窗样式 */
.register-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.role-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  background-color: white;
}

.professional-user {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.professional-user label {
  margin-left: 8px;
}

.button-group {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cancel-button {
  flex: 1;
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.register-submit-button {
  flex: 1;
  background-color: #4a6baf;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}
</style>
